<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
  <script type="text/javascript" th:src="@{https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js}"></script>
  <link th:href="@{https://cdn.bootcss.com/bootstrap/4.2.1/css/bootstrap.min.css}" rel="stylesheet"/>
  <link th:href="@{/css/default.css}" rel="stylesheet"/>
  <link rel="icon" th:href="@{/images/favicon.ico}" type="image/x-icon"/>
  <meta charset="UTF-8"/>
  <title>书籍管理</title>
</head>

<body>
<div class="contentDiv">

  <h5>《Spring Boot 2.x 核心技术实战 - 上 基础篇》第 4 章《模板引擎》Demo </h5>

  <legend>
    <strong>书籍管理</strong>
  </legend>

  <form th:action="@{/book/{action}(action=${action})}" method="post" class="form-horizontal">

    <input type="hidden" name="id" th:value="${book.id}"/>

    <div class="form-group">
      <label for="book_name" class="col-sm-2 control-label">书名:</label>
      <div class="col-xs-4">
        <input type="text" class="form-control" id="book_name" name="name" th:value="${book.name}"
               th:field="*{book.name}"/>
      </div>
    </div>

    <div class="form-group">
      <label for="book_writer" class="col-sm-2 control-label">作者:</label>
      <div class="col-xs-4">
        <input type="text" class="form-control" id="book_writer" name="writer" th:value="${book.writer}"
               th:field="*{book.writer}"/>
      </div>
    </div>

    <div class="form-group">
      <label for="book_introduction" class="col-sm-2 control-label">简介:</label>
      <div class="col-xs-4">
                <textarea class="form-control" id="book_introduction" rows="3" name="introduction"
                          th:value="${book.introduction}" th:field="*{book.introduction}"></textarea>
      </div>
    </div>

    <div class="form-group">
      <div class="col-sm-offset-2 col-sm-10">
        <input class="btn btn-primary" type="submit" value="提交"/>&nbsp;&nbsp;
        <input class="btn" type="button" value="返回" onclick="history.back()"/>
      </div>
    </div>
  </form>
</div>
</body>
</html>
